import request from '@/utils/request'
// 获取客户列表信息
export function getCustomerList(formData) {
  return request({
    method: 'get',
    url: '/clients',
    params: formData
  })
}

// 获取经理列表
export function getAgentsList() {
  return request({
    method: 'get',
    url: '/agents'
  })
}

// 新增客户列表
export function addCustomer(data) {
  return request({
    method: 'post',
    url: '/clients',
    data
  })
}

// 修改客户信息
export function editCustomerInfo(data) {
  return request({
    method: 'put',
    url: `/clients/${data.id}`,
    data
  })
}

// 删除客户
export function deleteCustomer(id) {
  return request({
    method: 'delete',
    url: `/clients/${id}`
  })
}

// 获取客户数量
export function customerNum(data) {
  return request({
    method: 'get',
    url: '/clients/count',
    params: data
  })
}

